//
//  AddressView.m
//  WisdomCommunity
//
//  Created by Yahaong on 16/7/26.
//  Copyright © 2016年 zonten. All rights reserved.
//

#import "AddressView.h"
#import "YHMarcros.h"
@implementation AddressView

- (instancetype)initWithFrame:(CGRect)frame
{
    self = [super initWithFrame:frame];
    if (self) {
        [self setupUI];
    }
    return self;
}
- (void)setupUI
{
    
    UIImageView *m_imgBg = [[UIImageView alloc]init];
    m_imgBg.image = [UIImage imageNamed:@"community_icon_addrbg"];
      [self addSubview:m_imgBg];
    [m_imgBg mas_makeConstraints:^(MASConstraintMaker *make) {
        make.edges.equalTo(self);
    }];
    UIImageView *m_imgLocation = [[UIImageView alloc]init];
    m_imgLocation.image = [UIImage imageNamed:@"community_icon_location"];
    [self addSubview:m_imgLocation];
    [m_imgLocation mas_makeConstraints:^(MASConstraintMaker *make) {
        make.leading.equalTo(self).offset(10);
        make.width.equalTo(16);
        make.height.equalTo(19);
        make.centerY.equalTo(self);
    }];
    UILabel *label = [[UILabel alloc]init];
    label.textColor = [UIColor whiteColor];
    label.font = [UIFont systemFontOfSize:14];
    label.text = @"正在建设中";
    [self addSubview:label];
    [label mas_makeConstraints:^(MASConstraintMaker *make) {
        make.leading.equalTo(m_imgLocation.trailing).offset(5);
        make.centerY.equalTo(self);
    }];
    
    UIImageView *m_imgArrow = [[UIImageView alloc]init];
    m_imgArrow.image = [UIImage imageNamed:@"community_icon_arrow"];
    [self addSubview:m_imgArrow];
    [m_imgArrow mas_makeConstraints:^(MASConstraintMaker *make) {
        make.leading.equalTo(label.trailing).offset(5);
        make.width.equalTo(16);
        make.height.equalTo(19);
        make.centerY.equalTo(self);
    }];
    
}
@end
